package mo.leetcode_hot;

import mo.common.TreeNode;

import java.util.ArrayList;
import java.util.List;

public class L94 {

    private List<Integer> res = new ArrayList<>();

    public List<Integer> inorderTraversal(TreeNode root) {
        if (root != null && root.left != null) {
            inorderTraversal(root.left);
        }
        if (root != null) {
            res.add(root.val);
        }
        if (root != null && root.right != null) {
            inorderTraversal(root.right);
        }
        return res;
    }






}
